import axios, {defaults} from "axios";
import {ProxyConfigClass} from "./Proxy";
import {useNavigate} from "react-router-dom";

function  post (url,date,config){
var res;
axios.post(ProxyConfigClass.isProxy ? ProxyConfigClass.urlPrefix : ProxyConfigClass.isGoLongUrt + url, date, config)
    .then(function (response) {
        if (response.status === 200) {
            res=response.data
        }else {

            res= false
        }
    }).catch(function (error) {
    alert(error);
});
    setTimeout(function(){
        //doSomething(这里写时间到之后需要去做的事情)
    }, 3000);

    console.log(res)
return res
}


export { post }
